<%--
  Created by IntelliJ IDEA.
  User: 胡斌
  Date: 2021/6/19
  Time: 21:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<sf:form modelAttribute="user" method="post" action="${pageContext.request.contextPath }/userPrac/save">
    <fieldset>
        <legend> 添加一个用户</legend>
        <P>
            <label>用户名:</label>
            <sf:input path="userName"/>
        </p>
        <P>
            <label>爱好:</label>
            <sf:checkboxes items="${hobbys}" path="hobby"/>
        </p>
        <P>
            <label>朋友:</label>
            <sf:checkbox path="friends" value="张三"/> 张三
            <sf:checkbox path="friends" value="李四"/> 李四
            <sf:checkbox path="friends" value="王五"/> 王五
            <sf:checkbox path="friends" value="赵六"/> 赵六
        </p>
        <P>
            <label>职业:</label>
            <sf:select path="carrier">
                <option/>
                请选择职业
                <sf:options items="${carriers}"/>
            </sf:select>
        </p>
        <P>
            <label>户籍：</label>
            <sf:select path="houseRegister">
                <option/>
                请选择户籍
                <sf:options items="${houseRegisters}"/>
            </sf:select>
        </p>
        <P>
            <label>个人描述:</label>
            <sf:textarea path="remark" rows="5"/>
        </p>
        <p id="buttons">
            <input id="reset" type="reset">
            <input id="submit" type="submit" value="添加">
        </p>
    </fieldset>
</sf:form>
</body>
</html>
